/*********************************************************************
* File: IReactiveWaypointNavigation.h
*
* Supports reactive waypoint navigation.
*********************************************************************/
#pragma once

namespace agents{namespace interfaces{
	/**
	* \class IReactiveWaypointNavigation
	* \brief Supports reactive waypoint navigation.
	*
	* Supports waypoint navigation, as long as the destination waypoint
	* is visible. Reactive agents should use this interface for navigation. 
	*
	* \author Instituto Superior Tecnico de Lisboa, Portugal
	* \author Technical University of Lisbon, Portugal
	* 
	* \author Agentes Autonomos e Sistemas Multiagente
	* \author Autonomous Agents and Multiagent Systems
	* 
	* \version	1.0
	* \date		2006/2007
	**/
	class IReactiveWaypointNavigation
	{
	public:
		
		//BUG 01: Move to invisible waypoint in the reactive agent: Start
		/**
		* \brief Moves the agent towards a specific waypoint, as long as it is visible.
		*
		* \param[in]  waypointIndex  The waypoint index.
		**/
		virtual bool moveToVisibleWaypoint(int waypointIndex) = 0;
		//BUG 01: End
		/** 
		* \brief Gets the current waypoint index.
		*
		* The current waypoint is, if the agent is following a path, 
		* the next in path; otherwise, it is simply the closest one.
		**/
		virtual int getCurrentWaypointIndex() = 0;
		/**
		* \brief Returns the current destination waypoint.
		*
		* \return  The waypoint index, if the agent is navigating; or -1, otherwise.
		**/
		virtual int getDestinationWaypointIndex() = 0;
		/**
		* \brief Whether a destination waypoint was set.
		**/
		virtual bool isDestinationWaypointSet() = 0;
		/**
		* \brief Whether the agent has reached the intended destination.
		**/
		virtual bool reachedDestinationWaypoint() = 0;
		/** 
		* \brief Stops the agent.
		*
		* Immediately stops the agent, ceasing to try to reach a waypoint. 
		**/
		virtual void stop() = 0;
		/** 
		* \brief Holds the agent's motion for one cycle.
		*
		* Immediately stops the agent, however, the agent continues to try 
		* to reach a waypoint in the next cycle.
		**/
		virtual void hold() = 0;

		/**
		* \brief Gets visible waypoints.
		*
		* Returned waypoints are \a not ordered by distance.
		*
		* \param[in] waypoints A buffer to hold the waypoints. 
		* \param[in] max The buffer maximum length. 
		*
		* \return The list of waypoints.
		**/
		virtual int getVisibleWaypoints( int* waypoints, int max ) = 0;
		/**
		* \brief Gets visible goal waypoints.
		*
		* Returned waypoints are \a not ordered by distance.
		*
		* \param[in] waypoints A buffer to hold the waypoints. 
		* \param[in] max The buffer maximum length. 
		*
		* \return The list of waypoints.
		**/
		virtual int getVisibleGoalWaypoints( int* waypoints, int max ) = 0;
		/**
		* \brief Gets visible terrorist important waypoints.
		*
		* Returned waypoints are \a not ordered by distance.
		*
		* \param[in] waypoints A buffer to hold the waypoints. 
		* \param[in] max The buffer maximum length. 
		*
		* \return The list of waypoints.
		**/
		virtual int getVisibleTerroristImportantWaypoints( int* waypoints, int max ) = 0;
		/**
		* \brief Gets visible counter-terrorist important waypoints.
		*
		* Returned waypoints are \a not ordered by distance.
		*
		* \param[in] waypoints A buffer to hold the waypoints. 
		* \param[in] max The buffer maximum length. 
		*
		* \return The list of waypoints.
		**/
		virtual int getVisibleCounterTerroristImportantWaypoints( int* waypoints, int max ) = 0;
		/**
		* \brief Gets visible camp waypoints.
		*
		* Returned waypoints are \a not ordered by distance.
		*
		* \param[in] waypoints A buffer to hold the waypoints. 
		* \param[in] max The buffer maximum length. 
		*
		* \return The list of waypoints.
		**/
		virtual int getVisibleCampWaypoints( int* waypoints, int max ) = 0;
		/**
		* \brief Gets the waypoint's position.
		*
		* \param[in] waypoint The waypoint. 
		**/
		virtual Vector getWaypointPosition(int waypoint) = 0;
		/**
		* \brief Whether a waypoint is a goal waypoint.
		*
		* \param[in] waypoint The waypoint. 
		**/
		virtual bool isGoalWaypoint(int waypoint) = 0;
		/**
		* \brief Whether a waypoint is a terrorist important waypoint.
		*
		* \param[in] waypoint The waypoint. 
		**/
		virtual bool isTerroristImportantWaypoint(int waypoint) = 0;
		/**
		* \brief Whether a waypoint is a counter-terrorist important waypoint.
		*
		* \param[in] waypoint The waypoint. 
		**/
		virtual bool isCounterTerroristImportantWaypoint(int waypoint) = 0;
		/**
		* \brief Whether a waypoint is a camp waypoint.
		*
		* \param[in] waypoint The waypoint. 
		**/
		virtual bool isCampWaypoint(int waypoint) = 0;
	};
}}
